/*
 * log.h
 *
 *  Created on: Jun 20, 2009
 *      Author: jlapointe
 */

#ifndef LOG_H_
#define LOG_H_

#include "producer_consumer.h"

#define LOG_PARENT_PATH "c:/dev/ws_cProducerConsumer/ProducerConsumer/log/"
#define LOG_LOCATION LOG_PARENT_PATH"test.txt"
#define ERROR_LOG_LOCATION LOG_PARENT_PATH"error.log"

/*
 * This function initializes the mutex and thread attribute variables and MUST
 * be called before any other function in this file.
 */
void logInitMutex();

void writeLog(char * source, request_t * req_t);

void writeError(char * source, char * msg);

void EraseLog();
void EraseErrorLog();

#endif /* LOG_H_ */
